 |
|
 |
 |
View previous topic :: View next topic |
Author |
Message |
Vincent
Joined: 07 Jan 2005 Posts: 426 Location: Nancy, France
|
Posted: Thu Nov 02, 2006 2:52 pm Post subject: DOWNLOAD the Celestia Lua Edu Tools (beta version) |
|
|
Hi,
- Here's a link to download the 1.2 beta version of the Lua Edu Tools :
> http://vincent.gian.club.fr/celestia/Celestia_edu_1pre3.zip
1- Unzip and paste the 'edu_test' folder directly in your 'extras' folder.
2- Paste the 'luahookinit.lua' file directly in your Celestia root folder.
3- Add this line to your celestia.cfg file :
Code: |
Configuration
{
LuaHook "luahookinit.lua" # <-- Line to add
... |
- Then, since the current CVS version doesn't include yet Hank's patch, you'll also need to download one of these files (modified 1.5.0 version) to run Celestia :
> Windows : http://vincent.gian.club.fr/celestia/celestia_edu.exe
> Mac OS-X : http://nho.ohn.free.fr/celestia/CelestiaLUA.app.zip (Thanks to ElChristou !)
Linux users can build their own version by applying the following patch against the current CVS version (no pre-compiled version is available for Linux yet).
> http://vincent.gian.club.fr/celestia/lua_edu.patch (Thanks to Christophe !)
Important : A Celestia 1.5.0 version must be present on your system. You can get some information about how to get it here : http://www.shatters.net/forum/viewtopic.php?t=10234
Then, I've added the possibility to take the Time Zone into account for the display of the time. Just click the Time Zone button (UTC, GMT+1, ...) to activate/unactivate the display of the setting window, and use the "< >" buttons to set your local Time Zone, :
Unfortunately, the Time Zone settings are not saved when you close Celestia... Well, not yet...
Finally, Just use [Shift]+[I] ("I" as Information... Hey devs, that's memnonic ! ) to activate/unactivate the display of the whole lua Edu tool. _________________ @+
Vincent
Celestia CVS/Celestia patch - GeForce 4 MX 440SE with AGP 8X - AMD 2400+ - 1Go Ram - Xp
Last edited by Vincent on Tue Nov 07, 2006 10:33 pm; edited 7 times in total |
|
Back to top » |
|
 |
chris Site Admin

Joined: 28 Jan 2002 Posts: 2136 Location: Seattle, Washington, USA
|
Posted: Thu Nov 02, 2006 4:18 pm Post subject: |
|
|
Is the Lua hook patch ready to be committed to CVS yet?
--Chris |
|
Back to top » |
|
 |
Vincent
Joined: 07 Jan 2005 Posts: 426 Location: Nancy, France
|
Posted: Thu Nov 02, 2006 4:44 pm Post subject: |
|
|
chris wrote: |
Is the Lua hook patch ready to be committed to CVS yet?
--Chris |
I've made some minor changes to Hank's original patch to add a few functions that I needed for the text layout. I'm waiting for Hank to confirm that the changes are OK. This version compiles fine under Windows and Mac OS-X (tested by ElChristou).
I've also sent the final patch to Christophe to test it under Linux. Christophe had to make a few changes to allow the patched version to compile under Linux. Now, everything seems to be OK.
We might just wait for Hank to confirm that the final version of the Lua hook patch is ready to be committed to CVS. _________________ @+
Vincent
Celestia CVS/Celestia patch - GeForce 4 MX 440SE with AGP 8X - AMD 2400+ - 1Go Ram - Xp |
|
Back to top » |
|
 |
Vincent
Joined: 07 Jan 2005 Posts: 426 Location: Nancy, France
|
Posted: Thu Nov 02, 2006 8:58 pm Post subject: |
|
|
Just a few more points for users who want to customize the tools :
- If you want to add your own Information Text and Images, just edit the 'infos/infoImage.lua' and 'infos/infoText.lua files'.
Then place your image files in the 'images' folder.
- If you want to contribute to the localization of the lua edu tools, just create your own 'locale/language/language.lua' and 'locale/language/infoText_language.lua' files.
You can use the 'locale/fr/fr.lua' and 'locale/fr/infoText_fr.lua' files as examples.
Then, please send me your translated files so that I can include them in the standard pack. _________________ @+
Vincent
Celestia CVS/Celestia patch - GeForce 4 MX 440SE with AGP 8X - AMD 2400+ - 1Go Ram - Xp |
|
Back to top » |
|
 |
Jedi
Joined: 02 Nov 2006 Posts: 2 Location: Tucson, Arizona USA
|
Posted: Thu Nov 02, 2006 11:41 pm Post subject: |
|
|
Love what you did with the Lua Hooks. It's something that makes working with Celestia easier.
I noticed that you used some functions from a script written by Harald Schmidt. One thing that I liked about it was the Azimuth and the Elevation. I was wondering if you were going to include this in a future version.
I was playing around with it, and found it was quite easy to incorporate that into the function.
Keep up the excellent work Vincent.[/img] |
|
Back to top » |
|
 |
Vincent
Joined: 07 Jan 2005 Posts: 426 Location: Nancy, France
|
Posted: Fri Nov 03, 2006 9:46 am Post subject: |
|
|
Jedi wrote: |
Love what you did with the Lua Hooks. It's something that makes working with Celestia easier.
I noticed that you used some functions from a script written by Harald Schmidt. One thing that I liked about it was the Azimuth and the Elevation. I was wondering if you were going to include this in a future version.
I was playing around with it, and found it was quite easy to incorporate that into the function.
Keep up the excellent work Vincent. |
Hi Jedi,
I'm happy to see that the Lua Edu Tools are easily customizable.
That is one important point Hank and I have kept in mind all along the building phase.
It is of course possible to incorporate the Azimuth and Elevation values, as you suggested.
However, since they not only refer to the observer but also to the selected object,
I'd prefer to place them in the selection Information Text, just next to the Ra and Dec values,
as you can see on the shot above. And that would also avoid making the compass too obtrusive.
Then, we could rename the button in the ToolBox from "Ra-Dec" to "Measure", or "Measures"...
The french word "Mesures" seems to be quite well adapted. Native English users' might suggest a better name for that Button...
Thanks for your support Jedi, and of course, "May the force be with us !"
 _________________ @+
Vincent
Celestia CVS/Celestia patch - GeForce 4 MX 440SE with AGP 8X - AMD 2400+ - 1Go Ram - Xp |
|
Back to top » |
|
 |
ElChristou

Joined: 04 Feb 2005 Posts: 1453 Location: A Frenchie in Paraguay (South America)
|
Posted: Fri Nov 03, 2006 6:25 pm Post subject: |
|
|
IMHO, the compass and the time box deserve to be integrated in the official code right now!! _________________
 |
|
Back to top » |
|
 |
Vincent
Joined: 07 Jan 2005 Posts: 426 Location: Nancy, France
|
Posted: Sat Nov 04, 2006 11:42 am Post subject: |
|
|
I've made a major update to the Lua Edu Tools.
You can download version 1.2 here :
> http://vincent.gian.club.fr/celestia/Celestia_edu_1.2.zip
You just need to replace the previous 'edu_test' folder with the new one (located in the 'extras' folder).
Here are the changes from the previous version :
- Added 'Azimuth' and 'Elevation' values, as suggested by Jedi.
- Allowed the 'Distance to Earth' to be expressed in different units (km > AU > ly). Actually, the 'Distance to Earth' represents the distance from an object to the surface of the Earth. That's particularly useful, e.g., to have an approximation (Earth is not a sphere) of the altitude of a satellite...
- Added the possibility to activate/unactivate the display of the timerate slider by clicking on the "Rate : ..... x" string (or its translation).
- Improved the code of the compass by displaying an uneven number of characters so that the main direction can be centered on the compass window. From the dev's point of view, I have also improved the compass lua code to make it more elegant and easily understood.
- Fixed a bug with the compass when the Milky Way was selected.
The link in my first post has been updated too. _________________ @+
Vincent
Celestia CVS/Celestia patch - GeForce 4 MX 440SE with AGP 8X - AMD 2400+ - 1Go Ram - Xp |
|
Back to top » |
|
 |
Sui Ota

Joined: 05 Oct 2005 Posts: 36 Location: Saitama, Japan
|
Posted: Sun Nov 05, 2006 11:43 am Post subject: |
|
|
Oh, this is great work!!!
It is convenient for using as planetarium!
I tried this under Windows XP SP2 and Mac OS X 10.4.8 PPC...
And I noticed several things.
Bugs...?:
1.
Using 2 or more characters(also using a 2 byte character) for the direction name of the compass, appearance of the direction bahaves strangely, espesially between "E" and "S". (with editing "locale")
2.
Using 2 byte character for the direction, a garble appears at the edge of compass when the character is on far right or far left. I think this is caused by reading only 1 byte of the 2 byte character.
3.
(Mac OS X) The localization did not work; English was shown.
4.
When window size is small, the size of "No image available." box is inappropriate(too small).
Small proposal:
5.
Vincent wrote: |
It is of course possible to incorporate the Azimuth and Elevation values, as you suggested.
However, since they not only refer to the observer but also to the selected object,
I'd prefer to place them in the selection Information Text, just next to the Ra and Dec values,
as you can see on the shot above. And that would also avoid making the compass too obtrusive.
|
But it is useless except in case of selecting reference object because the values are relative from "far" selected star(as observation from a very very tall tower...). It will be useful if the values show direction and altitude in the reference object's sky.
6.
The azimuth and elevetion of current viewpoint relative to reference object is also useful. This should be belonged to Compass, like Jedi shown. (In current version, this is achieved by selecting reference object, but...)
7.
On displaying boxes at the first time after launch or resizing windows, the process of structing the boxes is visible for a moment. (But this is no choice...?)
8.
The order of date, month and year depends on the locale, so it will be useful if it can be changed by editing files in locale folder. _________________ -Sui |
|
Back to top » |
|
 |
ElChristou

Joined: 04 Feb 2005 Posts: 1453 Location: A Frenchie in Paraguay (South America)
|
Posted: Sun Nov 05, 2006 12:06 pm Post subject: |
|
|
Sui Ota wrote: |
3.
(Mac OS X) The localization did not work; English was shown. |
Hello Sui, sorry I'm responsible for this, the version of the app I send to Vincent only have English and French lproj...
You can always open the bundle of a previous version (1.4.2) and copy/paste the japanese lproj in the bundle of this test version. _________________
 |
|
Back to top » |
|
 |
Sui Ota

Joined: 05 Oct 2005 Posts: 36 Location: Saitama, Japan
|
Posted: Sun Nov 05, 2006 12:30 pm Post subject: |
|
|
ElChristou wrote: |
Sui Ota wrote: |
3.
(Mac OS X) The localization did not work; English was shown. |
Hello Sui, sorry I'm responsible for this, the version of the app I send to Vincent only have English and French lproj...
You can always open the bundle of a previous version (1.4.2) and copy/paste the japanese lproj in the bundle of this test version. |
I've already copied ja.lproj into the app, but messages related to Luahook is not translated... _________________ -Sui |
|
Back to top » |
|
 |
Vincent
Joined: 07 Jan 2005 Posts: 426 Location: Nancy, France
|
Posted: Sun Nov 05, 2006 2:09 pm Post subject: |
|
|
Sui Ota,
Thanks for this very comprehensive feedback/bug report.
Then, as for the different points you've raised...
Quote: |
1.
Using 2 or more characters(also using a 2 byte character) for the direction name of the compass, appearance of the direction bahaves strangely, espesially between "E" and "S". (with editing "locale") |
The number of characters in the compass string (tools/compassBox.lua) has to remain constant.
So, only one single character can be used for each of the 4 cardinal points.
Could you precise why you need to use 2 or more characters ?
I could try to adapt the code to this special case if this is really a priority...
Quote: |
2.
Using 2 byte character for the direction, a garble appears at the edge of compass when the character is on far right or far left. I think this is caused by reading only 1 byte of the 2 byte character. |
I'm able to reproduce the bug using accentuated characters that are also encoded with 2 bytes in UTF-8 format.
In fact, the string.len(s) lua function reads the 2 bytes character as two different 1 byte characters...
I'll have a look at the Lua String Library Tutorial to see if the problem can be solved easily...
Quote: |
3.
(Mac OS X) The localization did not work; English was shown. |
ElChristou can confirm the problem, which only appears under Mac OS-X.
Strangely, the os.setlocale(nil, "collate") lua function doesn't return the local 'collate' category, but the local 'numeric' category,
even when the second argument is not 'numeric'. I've posted a bug report on the Lua website forum...
For now, Mac users can add this line to their locale.lua file, where LANGUAGE is the 2 characters string of the required
language, in lower case (fr, jp, ...) :
Code: |
local col = os.setlocale(nil, "collate");
lang = string.lower(string.sub(col, 1, 2));
lang = LANGUAGE -- <-- Line to add
... |
Quote: |
4.
When window size is small, the size of "No image available." box is inappropriate(too small). |
Problem solved ! The Celestia_edu_1.2.zip file has been updated.
Quote: |
6.
The azimuth and elevetion of current viewpoint relative to reference object is also useful. This should be belonged to Compass, like Jedi shown. (In current version, this is achieved by selecting reference object, but...) |
This is a really valid point. Azimuth and Elevation could refer to the reference/source object, as I did for Longitude and Latitude...
But I'd like to have other user's opinion here about whether or not we should add another string to the compass box...
Quote: |
7.
On displaying boxes at the first time after launch or resizing windows, the process of structing the boxes is visible for a moment. (But this is no choice...?) |
Yes, this happens for a fraction of a second, and only during the first display...
That may come from the time needed by the Lua Hook to be interprated by the Celestia Core...
Hank may confirm and possibly do something here... Even if this doesn't appear to be really annoying, does it ?
Quote: |
8.
The order of date, month and year depends on the locale, so it will be useful if it can be changed by editing files in locale folder. |
That's in my todo list ... I was first thinking about adding a setting window, as I did for the setting of the Time Zone...
But your idea of adding a line to the LANGUAGE.lua locale file is great !
Thanks again Sui Ota. _________________ @+
Vincent
Celestia CVS/Celestia patch - GeForce 4 MX 440SE with AGP 8X - AMD 2400+ - 1Go Ram - Xp |
|
Back to top » |
|
 |
Vincent
Joined: 07 Jan 2005 Posts: 426 Location: Nancy, France
|
Posted: Sun Nov 05, 2006 5:33 pm Post subject: |
|
|
OK,
I've been thinking about Jedi's and Sui Ota's suggestion to display the Azimuth and Elevation values from the
reference/source object, and so to include them into the compass box... And I think I found a good compromize :
- Case n°1 : When the observer is in 'navigation mode', the compass Box displays the [planetarium mode]
button along with the Longitude and Latitude string, so that the user can easily set the values of Long and Lat
and then switch to planetarium mode. In that case, the Azimuth and Elevation values are not displayed...
- Case n°2 : When the observer is in 'planetarium mode', the compass Box displays the compass, along with
the Azimuth and Elevation values relative to the source planet. In that case, the Longitude and Latitude values
are not used anymore, and so, they're not displayed...
I think this is a good compromize to keep the compass box unobtrusive...
But it would be helpful to have some other opinion(s) about that... _________________ @+
Vincent
Celestia CVS/Celestia patch - GeForce 4 MX 440SE with AGP 8X - AMD 2400+ - 1Go Ram - Xp |
|
Back to top » |
|
 |
Jedi
Joined: 02 Nov 2006 Posts: 2 Location: Tucson, Arizona USA
|
Posted: Sun Nov 05, 2006 6:48 pm Post subject: |
|
|
Thanks for all the work that you have done on this issue. I still believe this is a great add-on that enhances the Celestia program. I have two comments I would like to address.
1. The idea of changing the "Lat - Long" measurements to "Azimuth - Elevation" is a great. However, when in Planetarium mode, the object you may want to view could be below the horizon.
You can move along the surface of the object by using a right click to move to a position where the object is now above the horizon. Now the position on the object is unknown.
Another idea is to create a box inside the compass box. When it is clicked it will change the "Lat - Long" to "Azimuth - Elevation" back and forth. This way all the information can be present and still leave the compass box unobtrusive. Right now I am experimenting with this idea.
2. I noticed that in the time box you can bring up a box to change your time zone.
When you click the time box at the top to make the time disappear, the time zone box remains.
This should be easy to correct.
Thanks again for all of the work. I hope that they will encorporate this in the official release of Celestia 1.5.0 edition. |
|
Back to top » |
|
 |
Vincent
Joined: 07 Jan 2005 Posts: 426 Location: Nancy, France
|
Posted: Sun Nov 05, 2006 8:51 pm Post subject: |
|
|
Jedi wrote: |
Another idea is to create a box inside the compass box. When it is clicked it will change the "Lat - Long" to "Azimuth - Elevation" back and forth. This way all the information can be present and still leave the compass box unobtrusive. Right now I am experimenting with this idea. |
That's another nice solution, to which I can see 2 inconveniences, though :
- I'm trying to keep the colors as coherent as possible. Thus, the Longitude-Lattitude / Azimuth-Elevation string
should be written in pale blue, like in all other active boxes. The problem is that the pale blue color would make the string
too discrete, whereas it is an important element of the compass box...
- I also want to keep the general use of the tools very simple and instinctive. And above all, I wouldn't want the user
to need a tutorial... That's why I've opted for an automatic switch between Long-Lat and Az-Elev...
We could also use both your solution and mine : an automatic switch to Az-Elev, with the possibility to switch back to Long-Lat with a click...
Let's wait a bit and see what other users suggest...
Quote: |
When you click the time box at the top to make the time disappear, the time zone box remains. |
Problem solved.
Thanks again Jedi for your very constructive feedback. _________________ @+
Vincent
Celestia CVS/Celestia patch - GeForce 4 MX 440SE with AGP 8X - AMD 2400+ - 1Go Ram - Xp |
|
Back to top » |
|
 |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
 |
|
|
 |
|